package com.powernode.shop.oauth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.powernode.shop.oauth.domain.SysUser;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author ZHAOZHENYU
* @since 2022/10/9
*/
public interface SysUserMapper extends BaseMapper<SysUser> {
    @Select("SELECT distinct t1.perms FROM sys_menu as t1 join sys_role_menu as t2 on(t1.menu_id = t2.menu_id) join sys_user_role as t3 on(t2.role_id=t3.role_id) where t3.user_id = #{value} and t1.type = 2")
    List<String> selectAuthById(Long id);
}